<template>

<!-- <mt-cell class="song-cell" v-for="item in 100" :key="item" title="标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题标题"  is-link>
    <div>
      <i class="icon-music"></i>
      <span>999999</span>
    </div>
    <img class="plist-img" slot="icon" src="http://imge.kugou.com/mcommon/400/20150717/20150717100030907982.png" width="24" height="24">
  </mt-cell> -->

  <div class="list" >
     <mt-cell is-link 
      v-for="item in list" :key="item.title">
      <div class="info">
        <div class="text"> {{item.title}}</div>
        <div class="icon">
          <i class="icon-music"></i>
        <span>{{item.playcount}}</span>
        </div>
      </div>
      
      <img slot="icon" :src="item.img">
    </mt-cell>
   </div>
</template>

<script>
import { Cell } from 'mint-ui';
import {getList } from '@/severs'

export default {
  name: 'HelloWorld',
  components: {
    mtCell: Cell
  },
  data () {
    return {
      list: []
    }
  },
  async created(){
      let {data} = await getList();
      this.list = data.data.map(item=>{
          let img = item.imgurl.replace(/{size}/g, 400);
          return {
            title: item.specialname,
            playcount: item.playcount,
            img
          }
      })
  }
}
</script>

<style lang='less'>
   .list {
      margin-top:6.8rem;
      .mint-cell-title img { width: 90px; height: 90px; padding:15px 0;}
      .mint-cell-text { font-size: 20px;}
      
      .mint-cell-title { padding: 0;}

      .icon-music {
         display: inline-block;
          width: 1rem;
          height: 1rem;
          background: url('http://m.kugou.com/v3/static/images/index/icon_music.png') no-repeat;
          background-size: 100%;
      }
      .info { 
        padding-left:15px;
        .text { font-size:17px; color: #333; line-height: 1.4;}
        .icon { padding-top:5px;}
      }
   }
</style>
